<?xml version="1.0" encoding="ISO-8859-1" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:p="http://primefaces.org/ui">

    <ui:composition template="/template2.xhtml">
        <ui:define name="title">
            <h:outputText value="#{bundle.CreateAtoLegalTitle}"></h:outputText>
        </ui:define>
        <ui:define name="body">
            <h:panelGroup id="messagePanel" styleClass="ajustaListaMensagemErro"  layout="block">
                <h:messages errorStyle="color: red" infoStyle="color: green" layout="list"/>
            </h:panelGroup>


            <p:panel>
                <f:facet name="header">
                    <h:outputText value="#{bundle.LegendAtoLegalTitle}"/>
                </f:facet>

                <h:panelGrid columns="2">

                    <h:outputLabel value="#{bundle.CreateAtoLegalLabel_aleNumero}" for="aleNumero" />                

                    <h:panelGroup>
                        <p:inputMask id="aleNumero" mask="9?99999" maxlength="7" converter="atoLegalNumeroConverter" value="#{atoLegalController.selected.aleNumero}" title="#{bundle.CreateAtoLegalTitle_aleNumero}" required="true" requiredMessage="#{bundle.CreateAtoLegalRequiredMessage_aleNumero}"/>

                        <h:outputLabel value="#{bundle.CreateAtoLegalLabel_aleAno}" for="aleAno" />  
                        <p:inputMask id="aleAno" mask="9999" maxlength="4" size="6" required="true" requiredMessage="#{bundle.CreateAtoLegalRequiredMessage_aleAno}" value="#{atoLegalController.selected.aleAno}" title="#{bundle.CreateAtoLegalTitle_aleAno}" />

                    </h:panelGroup>

                    <h:outputLabel value="#{bundle.CreateAtoLegalLabel_aleTalId}" for="aleTalId" />                
                    <p:selectOneMenu id="aleTalId" value="#{atoLegalController.selected.aleTalId}" required="true" requiredMessage="#{bundle.CreateAtoLegalRequiredMessage_aleTalId}">
                        <f:selectItems value="#{tipoAtoLegalController.itemsAvailableSelectOne}"/>
                    </p:selectOneMenu>

                    <h:outputLabel value="#{bundle.CreateAtoLegalLabel_aleDt}" for="aleDt" />
                    <p:calendar  id="aleDt"  onkeyup="formatar(this, '##/##/####');" locale="#{bundle.localeApp}" maxdate="#{bundle.maxDateCalendar}" size="18" maxlength="10" 
                                 navigator="true" showOn="button" pattern="#{bundle.patternApp}" 
                                 value="#{atoLegalController.selected.aleDt}" title="#{bundle.CreateAtoLegalTitle_aleDt}" >
                        <f:convertDateTime for="aleDt" pattern="#{bundle.patternApp}" timeZone="#{filterSearchController.timeZone}"/>
                    </p:calendar> 

                </h:panelGrid>

                <br/>

                <p:commandButton ajax="false" rendered="#{!autenticadorController.loginVisualizador}" icon="#{bundle.icone_salvar}" action="#{atoLegalController.create}" value="#{bundle.CreateAtoLegalSaveLink}" /> &nbsp;
                <p:commandButton ajax="false" action="#{atoLegalController.prepareList}" icon="#{bundle.icone_listar}" value="#{bundle.CreateAtoLegalShowAllLink}" immediate="true"/>

            </p:panel>
        </ui:define>
    </ui:composition>

</html>
